71. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2022-11-18 03:12:07 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

71.1 Files compared

#LocationFileLast Modified
1Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2022-05-10 04:04:01 +0000
2Theme Files/Magento 2.x/Porto Theme/app/design/frontend/Smartwave/porto/Magento_Catalog/templates/productlist.phtml2022-10-24 08:06:22 +0000

71.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged5986
Changed315
Inserted00
Removed11

71.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

71.4 Active regular expressions

No regular expressions were active.

71.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2015 Magento. All rights reserved. 3  * Copyright © 2015 Magento. All rights reserved.
4  * See COPYING.txt for license details. 4  * See COPYING.txt for license details.
5  */ 5  */
6 use Magento\Framework\App\Action\Action; 6 use Magento\Framework\App\Action\Action;
7  7 
8 // @codingStandardsIgnoreFile 8 // @codingStandardsIgnoreFile
9  9  
10 ?> 10 ?>
11 <?php 11 <?php
12 /** 12 /**
13  * Product list template 13  * Product list template
14  * 14  *
15  * @var $block \Magento\Catalog\Block\Product\ListProduct 15  * @var $block \Magento\Catalog\Block\Product\ListProduct
16  */ 16  */
17 ?> 17 ?>
18 <?php 18 <?php
19 $_productCollection = $block->getLoadedProductCollection(); 19 $_productCollection = $block->getLoadedProductCollection();
20 $_helper = $this->helper('Magento\Catalog\Helper\Output'); 20 $_helper = $this->helper('Magento\Catalog\Helper\Output');
21 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image'); 21 $_imagehelper = $this->helper('Magento\Catalog\Helper\Image');
22  22 
23 // Daily deal Helper 23 // Daily deal Helper
24 $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data'); 24 $_dailydealhelper =$this->helper('Smartwave\Dailydeals\Helper\Data');
25  25 
26 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 26 $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
27  27 
28 $_category_config = $_portohelper->getConfig('porto_settings/category'); 28 $_category_config = $_portohelper->getConfig('porto_settings/category');
29 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid'); 29 $_category_grid_config = $_portohelper->getConfig('porto_settings/category_grid');
30 $_product_label_config = $_portohelper->getConfig('porto_settings/product_label'); 30 $_product_label_config = $_portohelper->getConfig('porto_settings/product_label');
31 $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload'); 31 $_lazyload = $_portohelper->getConfig('porto_settings/optimization/lazyload');
32 $_inscroll = $_portohelper->getConfig('layered_navigation/general/infinite_scroller'); 32 $_inscroll = $_portohelper->getConfig('layered_navigation/general/infinite_scroller');
33 ?> 33 ?>
34 <?php $iterator = 1; ?> 34 <?php $iterator = 1; ?>
35 <?php if (!$_productCollection->count()): ?> 35 <?php if (!$_productCollection->count()): ?>
36     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div> 36     <div class="message info empty"><div><?php echo __('We can\'t find products matching the selection.') ?></div></div>
37 <?php else: ?> 37 <?php else: ?>
38     <?php echo $block->getToolbarHtml() ?> 38     <?php echo $block->getToolbarHtml() ?>
39     <?php echo $block->getAdditionalHtml() ?> 39     <?php echo $block->getAdditionalHtml() ?>
40     <?php 40     <?php
41     if ($block->getMode() == 'grid') { 41     if ($block->getMode() == 'grid') {
42         $viewMode = 'grid'; 42         $viewMode = 'grid';
43         $image = 'category_page_grid'; 43         $image = 'category_page_grid';
44         $hover_image = 'category_page_grid-hover'; 44         $hover_image = 'category_page_grid-hover';
45         $showDescription = false; 45         $showDescription = false;
46         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW; 46         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::SHORT_VIEW;
47         $columns = 'columns'.$_category_grid_config['columns']; 47         $columns = 'columns'.$_category_grid_config['columns'];
48         $product_type = $_category_grid_config['product_type']; 48         $product_type = $_category_grid_config['product_type'];
49         if($product_type == null) { 49         if($product_type == null) {
50             $product_type = 1; 50             $product_type = 1;
51         } 51         }
52     } else { 52     } else {
53         $viewMode = 'list'; 53         $viewMode = 'list';
54         $image = 'category_page_list'; 54         $image = 'category_page_list';
55         $hover_image = 'category_page_list-hover'; 55         $hover_image = 'category_page_list-hover';
56         $showDescription = true; 56         $showDescription = true;
57         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW; 57         $templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::FULL_VIEW;
58         $columns = ''; 58         $columns = '';
59         $product_type = 0; 59         $product_type = 0;
60     } 60     }
61     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300; 61     $image_width = ($_category_config['ratio_width'])?$_category_config['ratio_width']:300;
62     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300; 62     $image_height = ($_category_config['ratio_height'])?$_category_config['ratio_height']:300;
63     $aspect_ratio = $_category_config['aspect_ratio']; 63     $aspect_ratio = $_category_config['aspect_ratio'];
64     if($aspect_ratio) 64     if($aspect_ratio)
65         $image_height = $image_width; 65         $image_height = $image_width;
66     ?> 66     ?>
67     <div class="products wrapper <?php echo $viewMode; ?> <?php echo $columns; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>"> 67     <div class="products wrapper <?php echo $viewMode; ?> <?php echo $columns; ?> products-<?php echo $viewMode; ?> <?php if($product_type == 2): ?>no-padding divider-line<?php endif; ?> <?php if($product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8): ?>no-padding<?php endif; ?> <?php if($product_type == 6): ?>divider-line<?php endif; ?>">
68         <?php $iterator = 1; ?> 68         <?php $iterator = 1; ?>
69         <ol class="filterproducts products list items product-items"> 69         <ol class="filterproducts products list items product-items">
70             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?> 70             <?php /** @var $_product \Magento\Catalog\Model\Product */ ?>
71             <?php foreach ($_productCollection as $_product): ?> 71             <?php foreach ($_productCollection as $_product): ?>
72                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?> 72                 <?php echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
73                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid"> 73                 <div class="product-item-info type<?php echo $product_type; ?>" data-container="product-grid">
74                     <?php // Product Image ?> 74                     <?php // Product Image ?>
75                     <div class="product photo product-item-photo"> 75                     <div class="product photo product-item-photo">
76                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1"> 76                         <a href="<?php echo $_product->getProductUrl() ?>" tabindex="-1">
77                         <?php 77                         <?php
78                             if($aspect_ratio) 78                             if($aspect_ratio)
79                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 79                                 $productImage = $_imagehelper->init($_product, $image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
80                             else 80                             else
81                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height); 81                                 $productImage = $_imagehelper->init($_product, $image)->resize($image_width, $image_height);
82                             $productImageUrl = $productImage->getUrl(); 82                             $productImageUrl = $productImage->getUrl();
83                         ?> 83                         ?>
84                             <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/> 84                             <img class="product-image-photo default_image <?php if(!$_lazyload): ?>porto-lazyload<?php endif;?>" <?php if(!$_lazyload): ?>data-<?php endif; ?>src="<?php echo $productImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productImage->getLabel();?>"/>
85                         <?php if($_category_config['alternative_image']): ?> 85                         <?php if($_category_config['alternative_image']): ?>
86                         <?php 86                         <?php
87                             if($aspect_ratio) 87                             if($aspect_ratio)
88                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width); 88                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($image_width);
89                             else 89                             else
90                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height); 90                                 $productHoverImage = $_imagehelper->init($_product, $hover_image)->resize($image_width, $image_height);
91                             $productHoverImageUrl = $productHoverImage->getUrl(); 91                             $productHoverImageUrl = $productHoverImage->getUrl();
92                         ?> 92                         ?>
93                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?> 93                             <?php if($productImageUrl != str_replace("/thumbnail/","/small_image/",$productHoverImageUrl)): ?>
94                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/> 94                             <img class="product-image-photo hover_image" src="<?php echo $productHoverImageUrl; ?>" width="<?php echo $image_width; ?>" height="<?php echo $image_height; ?>" alt="<?php //echo $productHoverImage->getLabel();?>"/>
95                             <?php endif; ?> 95                             <?php endif; ?>
96                         <?php endif; ?> 96                         <?php endif; ?>
97                         </a> 97                         </a>
98                         <?php 98                         <?php
99                             $product_label = ""; 99                             $product_label = "";
100                             if($_product_label_config['sale_label']) { 100                             if($_product_label_config['sale_label']) {
101                                 $orgprice = $_product->getPrice(); 101                                 if ($percentage = $_portohelper->getPercentage($_product)) {
102                                 $specialprice = $_product->getSpecialPrice();    
103                                 $specialfromdate = $_product->getSpecialFromDate();    
104                                 $specialtodate = $_product->getSpecialToDate();    
105                                 $today = time();    
106                                 if(!$specialprice)    
107                                     $specialprice = $orgprice;    
108                                 if($specialprice < $orgprice) {    
109                                     if((is_null($specialfromdate) && is_null($specialtodate)) || ($today >= strtotime($specialfromdate) && is_null($specialtodate)) || ($today <= strtotime($specialtodate) && is_null($specialfromdate)) || ($today >= strtotime($specialfromdate) && $today <= strtotime($specialtodate))){    
110                                         if($_product_label_config['sale_label_percent']) { 102                                     if($_product_label_config['sale_label_percent']) {
111                                             $save_percent = 100-round(($specialprice/$orgprice)*100); 103                                         $product_label .= '<div class="product-label sale-label">'.
$percentage.'%'.'</div>';
112                                             $product_label .= '<div class="product-label sale-label">'.'-'.$save_percent.'%'.'</div>';    
113                                         } else { 104                                     } else {
114                                             $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>'; 105                                         $product_label .= '<div class="product-label sale-label">'.$_product_label_config['sale_label_text'].'</div>';
115                                         } 106                                     }
116                                     } 107                                 }
117                                 } 108                             }
118                             }    
119                             if($_product_label_config['new_label']) { 109                             if($_product_label_config['new_label']) {
120                                 $now = date("Y-m-d"); 110                                 $now = date("Y-m-d");
121                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10); 111                                 $newsFrom= substr($_product->getData('news_from_date')?$_product->getData('news_from_date'):'',0,10);
122                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10); 112                                 $newsTo=  substr($_product->getData('news_to_date')?$_product->getData('news_to_date'):'',0,10);
123  113 
124                                 if ($newsTo != '' || $newsFrom != ''){ 114                                 if ($newsTo != '' || $newsFrom != ''){
125                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) { 115                                     if (($newsTo != '' && $newsFrom != '' && $now>=$newsFrom && $now<=$newsTo) || ($newsTo == '' && $now >=$newsFrom) || ($newsFrom == '' && $now<=$newsTo)) {
126                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>'; 116                                         $product_label .= '<div class="product-label new-label">'.$_product_label_config['new_label_text'].'</div>';
127                                     } 117                                     }
128                                 } 118                                 }
129                             } 119                             }
130                             if($product_label) 120                             if($product_label)
131                                 echo '<div class="product-labels">'.$product_label.'</div>'; 121                                 echo '<div class="product-labels">'.$product_label.'</div>';
132                         ?> 122                         ?>
133                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?> 123                         <?php if($product_type == 3 || $product_type == 5 || $product_type == 6 || $product_type == 7 || $product_type == 8 || $product_type == 9): ?>
134                         <div class="product-item-inner"> 124                         <div class="product-item-inner">
135                             <div class="product actions product-item-actions"> 125                             <div class="product actions product-item-actions">
136                                 <div class="actions-primary"> 126                                 <div class="actions-primary">
137                                     <?php if ($_product->isSaleable()): ?> 127                                     <?php if ($_product->isSaleable()): ?>
138                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 128                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
139                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 129                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
140                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 130                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
141                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 131                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
142                                             <?php echo $block->getBlockHtml('formkey')?> 132                                             <?php echo $block->getBlockHtml('formkey')?>
143                                             <button type="submit" 133                                             <button type="submit"
144                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 134                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
145                                                     class="action tocart primary"> 135                                                     class="action tocart primary">
146                                                 <span><?php echo __('Add to Cart') ?></span> 136                                                 <span><?php echo __('Add to Cart') ?></span>
147                                             </button> 137                                             </button>
148                                         </form> 138                                         </form>
149                                     <?php else: ?> 139                                     <?php else: ?>
150                                         <?php if ($_product->getIsSalable()): ?> 140                                         <?php if ($_product->getIsSalable()): ?>
151                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 141                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
152                                         <?php else: ?> 142                                         <?php else: ?>
153                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 143                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
154                                         <?php endif; ?> 144                                         <?php endif; ?>
155                                     <?php endif; ?> 145                                     <?php endif; ?>
156                                 </div> 146                                 </div>
157                                 <?php if ($block->getMode() == 'grid'): ?> 147                                 <?php if ($block->getMode() == 'grid'): ?>
158                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 148                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
159                                     <a href="#" 149                                     <a href="#"
160                                        class="action towishlist actions-secondary" 150                                        class="action towishlist actions-secondary"
161                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 151                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
162                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 152                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
163                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 153                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
164                                        data-action="add-to-wishlist" 154                                        data-action="add-to-wishlist"
165                                        role="button"> 155                                        role="button">
166                                         <span><?php echo __('Add to Wish List') ?></span> 156                                         <span><?php echo __('Add to Wish List') ?></span>
167                                     </a> 157                                     </a>
168                                 <?php endif; ?> 158                                 <?php endif; ?>
169                                 <?php endif; ?> 159                                 <?php endif; ?>
170                                 <?php if($_category_config['addtocompare']): ?> 160                                 <?php if($_category_config['addtocompare']): ?>
171                                 <?php 161                                 <?php
172                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 162                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
173                                 ?> 163                                 ?>
174                                 <a href="#" 164                                 <a href="#"
175                                    class="action tocompare actions-secondary" 165                                    class="action tocompare actions-secondary"
176                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 166                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
177                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 167                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
178                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 168                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
179                                    role="button"> 169                                    role="button">
180                                     <span><?php echo __('Add to Compare') ?></span> 170                                     <span><?php echo __('Add to Compare') ?></span>
181                                 </a> 171                                 </a>
182                                 <?php endif; ?> 172                                 <?php endif; ?>
183                             </div> 173                             </div>
184                         </div> 174                         </div>
185                         <?php endif; ?> 175                         <?php endif; ?>
186                         <!-- Dailydeal Product data --> 176                         <!-- Dailydeal Product data -->
187                         <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?> 177                         <?php if($_dailydealhelper->isDealProduct($_product->getId())) : ?>
188                         <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?> 178                         <?php $unique_id = rtrim(base64_encode(md5(microtime())),"="); ?>
189                         <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" > 179                         <input type="hidden" id="todate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealToDate($_product->getSku()); ?>" >
190                         <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>"> 180                         <input type="hidden" id="fromdate_<?php echo $unique_id; ?>" value="<?php echo $_dailydealhelper->getDailydealFromDate($_product->getSku()); ?>">
191                         <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>"> 181                         <div class="sw-dailydeal-wrapper" style="display:none;" data-unique-id="<?php echo $unique_id; ?>">
192                             <div class="sw-dailydeal"> 182                             <div class="sw-dailydeal">
193                                 <p id="expired_<?php echo $unique_id; ?>"></p> 183                                 <p id="expired_<?php echo $unique_id; ?>"></p>
194                                 <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;"> 184                                 <div class="countdowncontainer countdowncontainer_<?php echo $unique_id; ?>" style="display:none;">
195                                     <span class="dailydeal-label"> 185                                     <span class="dailydeal-label">
196                                         <?php echo __('Ends In:'); ?> 186                                         <?php echo __('Ends In:'); ?>
197                                     </span> 187                                     </span>
198                                     <span class="number-wrapper"> 188                                     <span class="number-wrapper">
199                                         <div class="line"></div> 189                                         <div class="line"></div>
200                                         <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span> 190                                         <span class="number day"><p id="countdown_days_<?php echo $unique_id; ?>">00</p></span>
201                                         <div class="caption"><?php echo __('Day(s), '); ?></div> 191                                         <div class="caption"><?php echo __('Day(s), '); ?></div>
202                                     </span> 192                                     </span>
203  193 
204                                     <span class="number-wrapper"> 194                                     <span class="number-wrapper">
205                                         <div class="line"></div> 195                                         <div class="line"></div>
206                                         <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span> 196                                         <span class="number hour"><p id="countdown_hours_<?php echo $unique_id; ?>">00</p></span>
207                                         <div class="caption">:</div> 197                                         <div class="caption">:</div>
208                                     </span> 198                                     </span>
209  199 
210                                     <span class="number-wrapper"> 200                                     <span class="number-wrapper">
211                                         <div class="line"></div> 201                                         <div class="line"></div>
212                                         <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span> 202                                         <span class="number min"><p id="countdown_minutes_<?php echo $unique_id; ?>">00</p></span>
213                                         <div class="caption">:</div> 203                                         <div class="caption">:</div>
214                                     </span> 204                                     </span>
215  205 
216                                     <span class="number-wrapper"> 206                                     <span class="number-wrapper">
217                                         <div class="line"></div> 207                                         <div class="line"></div>
218                                         <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span> 208                                         <span class="number sec"><p id="countdown_seconds_<?php echo $unique_id; ?>">00</p></span>
219                                         <div class="caption"></div> 209                                         <div class="caption"></div>
220                                     </span> 210                                     </span>
221                                 </div> 211                                 </div>
222                             </div> 212                             </div>
223                         </div> 213                         </div>
224                         <?php endif; ?> 214                         <?php endif; ?>
225                         <!-- Dailydeal Product End --> 215                         <!-- Dailydeal Product End -->
226                     </div> 216                     </div>
227                     <div class="product details product-item-details"> 217                     <div class="product details product-item-details">
228                         <?php 218                         <?php
229                             $_productNameStripped = $block->stripTags($_product->getName(), null, true); 219                             $_productNameStripped = $block->stripTags($_product->getName(), null, true);
230                         ?> 220                         ?>
231                         <strong class="product name product-item-name"> 221                         <strong class="product name product-item-name">
232                             <a class="product-item-link" 222                             <a class="product-item-link"
233                                href="<?php echo $_product->getProductUrl() ?>"> 223                                href="<?php echo $_product->getProductUrl() ?>">
234                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?> 224                                 <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name'); ?>
235                             </a> 225                             </a>
236                         </strong> 226                         </strong>
237                         <?php if($_category_config['rating_star']): ?> 227                         <?php if($_category_config['rating_star']): ?>
238                         <?php 228                         <?php
239                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType); 229                             $review_html = $block->getReviewsSummaryHtml($_product, $templateType);
240                         ?> 230                         ?>
241                         <?php if($review_html): ?> 231                         <?php if($review_html): ?>
242                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?> 232                             <?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
243                         <?php else: ?> 233                         <?php else: ?>
244                         <div class="product-reviews-summary short"> 234                         <div class="product-reviews-summary short">
245                             <div class="rating-summary"> 235                             <div class="rating-summary">
246                                 <span class="label"><span>Rating:</span></span> 236                                 <span class="label"><span>Rating:</span></span>
247                                 <div class="rating-result" title="0%"> 237                                 <div class="rating-result" title="0%">
248                                     <span style="width:0"><span>0%</span></span> 238                                     <span style="width:0"><span>0%</span></span>
249                                 </div> 239                                 </div>
250                             </div> 240                             </div>
251                         </div> 241                         </div>
252                         <?php endif; ?> 242                         <?php endif; ?>
253                         <?php endif; ?> 243                         <?php endif; ?>
254  244 
255                         <?php if ($showDescription):?> 245                         <?php if ($showDescription):?>
256                             <div class="product description product-item-description"> 246                             <div class="product description product-item-description">
257                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?> 247                                 <?php echo $_helper->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>
258                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" 248                                 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>"
259                                    class="action more"><?php echo __('Learn More') ?></a> 249                                    class="action more"><?php echo __('Learn More') ?></a>
260                             </div> 250                             </div>
261                         <?php endif; ?> 251                         <?php endif; ?>
262                         <?php if($_category_config['product_price']): ?> 252                         <?php if($_category_config['product_price']): ?>
263                         <?php echo $block->getProductPrice($_product) ?> 253                         <?php echo $block->getProductPrice($_product) ?>
264                         <?php endif; ?> 254                         <?php endif; ?>
265                         <?php echo $block->getProductDetailsHtml($_product); ?> 255                         <?php echo $block->getProductDetailsHtml($_product); ?>
266  256 
267                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?> 257                         <?php if($product_type != 3 && $product_type != 5 && $product_type != 6 && $product_type != 7 && $product_type != 8 && $product_type != 9): ?>
268                         <div class="product-item-inner"> 258                         <div class="product-item-inner">
269                             <div class="product actions product-item-actions"> 259                             <div class="product actions product-item-actions">
270                                 <?php if ($block->getMode() == 'grid'): ?> 260                                 <?php if ($block->getMode() == 'grid'): ?>
271                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?> 261                                 <?php if($_category_config['addtowishlist'] && $product_type != 4): ?>
272                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 262                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
273                                     <a href="#" 263                                     <a href="#"
274                                        class="action towishlist actions-secondary" 264                                        class="action towishlist actions-secondary"
275                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 265                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
276                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 266                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
277                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 267                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
278                                        data-action="add-to-wishlist" 268                                        data-action="add-to-wishlist"
279                                        role="button"> 269                                        role="button">
280                                         <span><?php echo __('Add to Wish List') ?></span> 270                                         <span><?php echo __('Add to Wish List') ?></span>
281                                     </a> 271                                     </a>
282                                 <?php endif; ?> 272                                 <?php endif; ?>
283                                 <?php endif; ?> 273                                 <?php endif; ?>
284                                 <?php endif; ?> 274                                 <?php endif; ?>
285                                 <div class="actions-primary"> 275                                 <div class="actions-primary">
286                                     <?php if ($_product->isSaleable()): ?> 276                                     <?php if ($_product->isSaleable()): ?>
287                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?> 277                                         <?php $postParams = $block->getAddToCartPostParams($_product); ?>
288                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post"> 278                                         <form data-role="tocart-form" action="<?php echo $postParams['action']; ?>" method="post">
289                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>"> 279                                             <input type="hidden" name="product" value="<?php echo $postParams['data']['product']; ?>">
290                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>"> 280                                             <input type="hidden" name="<?php echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
291                                             <?php if($product_type == 10):?> 281                                             <?php if($product_type == 10):?>
292                                                 <div class="qty-box"> 282                                                 <div class="qty-box">
293                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a> 283                                                     <a href="javascript:void(0)" class="qtyminus"><i class="porto-icon-minus"></i></a>
294                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/> 284                                                     <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo ($this->getMinimalQty($_product)?$this->getMinimalQty($_product):1) ?>" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>"/>
295                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a> 285                                                     <a href="javascript:void(0)" class="qtyplus"><i class="porto-icon-plus"></i></a>
296                                                 </div> 286                                                 </div>
297                                             <?php endif;?> 287                                             <?php endif;?>
298                                             <?php echo $block->getBlockHtml('formkey')?> 288                                             <?php echo $block->getBlockHtml('formkey')?>
299                                             <button type="submit" 289                                             <button type="submit"
300                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>" 290                                                     title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
301                                                     class="action tocart primary"> 291                                                     class="action tocart primary">
302                                                 <span><?php echo __('Add to Cart') ?></span> 292                                                 <span><?php echo __('Add to Cart') ?></span>
303                                             </button> 293                                             </button>
304                                         </form> 294                                         </form>
305                                     <?php else: ?> 295                                     <?php else: ?>
306                                         <?php if ($_product->getIsSalable()): ?> 296                                         <?php if ($_product->getIsSalable()): ?>
307                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div> 297                                             <div class="stock available"><span><?php echo __('In stock') ?></span></div>
308                                         <?php else: ?> 298                                         <?php else: ?>
309                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div> 299                                             <div class="stock unavailable"><span><?php echo __('Out of stock') ?></span></div>
310                                         <?php endif; ?> 300                                         <?php endif; ?>
311                                     <?php endif; ?> 301                                     <?php endif; ?>
312                                 </div> 302                                 </div>
313                                 <?php if ($block->getMode() == 'grid'): ?> 303                                 <?php if ($block->getMode() == 'grid'): ?>
314                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?> 304                                 <?php if($_category_config['addtowishlist'] && $product_type == 4): ?>
315                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 305                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
316                                     <a href="#" 306                                     <a href="#"
317                                        class="action towishlist actions-secondary" 307                                        class="action towishlist actions-secondary"
318                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 308                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
319                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 309                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
320                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 310                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
321                                        data-action="add-to-wishlist" 311                                        data-action="add-to-wishlist"
322                                        role="button"> 312                                        role="button">
323                                         <span><?php echo __('Add to Wish List') ?></span> 313                                         <span><?php echo __('Add to Wish List') ?></span>
324                                     </a> 314                                     </a>
325                                 <?php endif; ?> 315                                 <?php endif; ?>
326                                 <?php endif; ?> 316                                 <?php endif; ?>
327                                 <?php endif; ?> 317                                 <?php endif; ?>
328                                 <?php if ($block->getMode() == 'list'): ?> 318                                 <?php if ($block->getMode() == 'list'): ?>
329                                 <?php if($_category_config['addtowishlist']): ?> 319                                 <?php if($_category_config['addtowishlist']): ?>
330                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?> 320                                 <?php if ($this->helper('Magento\Wishlist\Helper\Data')->isAllow()): ?>
331                                     <a href="#" 321                                     <a href="#"
332                                        class="action towishlist actions-secondary" 322                                        class="action towishlist actions-secondary"
333                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 323                                        title="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
334                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>" 324                                        aria-label="<?php echo $block->escapeHtml(__('Add to Wish List')); ?>"
335                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>' 325                                        data-post='<?php echo $block->getAddToWishlistParams($_product); ?>'
336                                        data-action="add-to-wishlist" 326                                        data-action="add-to-wishlist"
337                                        role="button"> 327                                        role="button">
338                                         <span><?php echo __('Add to Wish List') ?></span> 328                                         <span><?php echo __('Add to Wish List') ?></span>
339                                     </a> 329                                     </a>
340                                 <?php endif; ?> 330                                 <?php endif; ?>
341                                 <?php endif; ?> 331                                 <?php endif; ?>
342                                 <?php endif; ?> 332                                 <?php endif; ?>
343                                 <?php if($_category_config['addtocompare']): ?> 333                                 <?php if($_category_config['addtocompare']): ?>
344                                 <?php 334                                 <?php
345                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare'); 335                                 $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');
346                                 ?> 336                                 ?>
347                                 <a href="#" 337                                 <a href="#"
348                                    class="action tocompare actions-secondary" 338                                    class="action tocompare actions-secondary"
349                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 339                                    title="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
350                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>" 340                                    aria-label="<?php echo $block->escapeHtml(__('Add to Compare')); ?>"
351                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>' 341                                    data-post='<?php echo $compareHelper->getPostDataParams($_product); ?>'
352                                    role="button"> 342                                    role="button">
353                                     <span><?php echo __('Add to Compare') ?></span> 343                                     <span><?php echo __('Add to Compare') ?></span>
354                                 </a> 344                                 </a>
355                                 <?php endif; ?> 345                                 <?php endif; ?>
356                             </div> 346                             </div>
357                         </div> 347                         </div>
358                         <?php endif; ?> 348                         <?php endif; ?>
359                     </div> 349                     </div>
360                 </div> 350                 </div>
361                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?> 351                 <?php echo($iterator == count($_productCollection)+1) ? '</li>' : '' ?>
362             <?php endforeach; ?> 352             <?php endforeach; ?>
363         </ol> 353         </ol>
364     </div> 354     </div>
365     <?php if(isset($_inscroll) && $_inscroll):?> 355     <?php if(isset($_inscroll) && $_inscroll):?>
366     <div class="infinite-loader"><a href="javascript:void(0)" class="loading" style="display: none;"><?php echo __("Loading ..."); ?></a><a href="javascript:void(0)" class="btn-load-more"><?php echo __("Load More ..."); ?></a></div> 356     <div class="infinite-loader"><a href="javascript:void(0)" class="loading" style="display: none;"><?php echo __("Loading ..."); ?></a><a href="javascript:void(0)" class="btn-load-more"><?php echo __("Load More ..."); ?></a></div>
367     <?php endif;?> 357     <?php endif;?>
368     <?php echo $block->getToolbarHtml() ?> 358     <?php echo $block->getToolbarHtml() ?>
369     <?php if (!$block->isRedirectToCartEnabled()) : ?> 359     <?php if (!$block->isRedirectToCartEnabled()) : ?>
370         <script type="text/x-magento-init"> 360         <script type="text/x-magento-init">
371         { 361         {
372             "[data-role=tocart-form], .form.map.checkout": { 362             "[data-role=tocart-form], .form.map.checkout": {
373                 "catalogAddToCart": {} 363                 "catalogAddToCart": {}
374             } 364             }
375         } 365         }
376         </script> 366         </script>
377     <?php endif; ?> 367     <?php endif; ?>
378     <?php if ($block->getMode() == 'grid'): ?> 368     <?php if ($block->getMode() == 'grid'): ?>
379         <script type="text/javascript"> 369         <script type="text/javascript">
380             require([ 370             require([
381                 'jquery' 371                 'jquery'
382             ], function ($) { 372             ], function ($) {
383                 $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n'); 373                 $('.main .products.grid .product-items li.product-item:nth-child(2n)').addClass('nth-child-2n');
384                 $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1'); 374                 $('.main .products.grid .product-items li.product-item:nth-child(2n+1)').addClass('nth-child-2np1');
385                 $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n'); 375                 $('.main .products.grid .product-items li.product-item:nth-child(3n)').addClass('nth-child-3n');
386                 $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1'); 376                 $('.main .products.grid .product-items li.product-item:nth-child(3n+1)').addClass('nth-child-3np1');
387                 $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n'); 377                 $('.main .products.grid .product-items li.product-item:nth-child(4n)').addClass('nth-child-4n');
388                 $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1'); 378                 $('.main .products.grid .product-items li.product-item:nth-child(4n+1)').addClass('nth-child-4np1');
389                 $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n'); 379                 $('.main .products.grid .product-items li.product-item:nth-child(5n)').addClass('nth-child-5n');
390                 $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1'); 380                 $('.main .products.grid .product-items li.product-item:nth-child(5n+1)').addClass('nth-child-5np1');
391                 $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n'); 381                 $('.main .products.grid .product-items li.product-item:nth-child(6n)').addClass('nth-child-6n');
392                 $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1'); 382                 $('.main .products.grid .product-items li.product-item:nth-child(6n+1)').addClass('nth-child-6np1');
393                 $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n'); 383                 $('.main .products.grid .product-items li.product-item:nth-child(7n)').addClass('nth-child-7n');
394                 $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1'); 384                 $('.main .products.grid .product-items li.product-item:nth-child(7n+1)').addClass('nth-child-7np1');
395                 $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n'); 385                 $('.main .products.grid .product-items li.product-item:nth-child(8n)').addClass('nth-child-8n');
396                 $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1'); 386                 $('.main .products.grid .product-items li.product-item:nth-child(8n+1)').addClass('nth-child-8np1');
397             }); 387             });
398         </script> 388         </script>
399     <?php endif; ?> 389     <?php endif; ?>
400 <?php endif; ?> 390 <?php endif; ?>
401 <script type="text/javascript"> 391 <script type="text/javascript">
402     require([ 392     require([
403         'jquery' 393         'jquery'
404     ], function ($) { 394     ], function ($) {
405       var app = { 395       var app = {
406           isAppleDevice: function() { 396           isAppleDevice: function() {
407             if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) { 397             if (navigator.userAgent.match(/(iPhone|iPod|iPad|Safari)/) != null) {
408               return true; 398               return true;
409             } 399             }
410             return false; 400             return false;
411           } 401           }
412       } 402       }
413     // Timer for LEFT time for Dailydeal product 403     // Timer for LEFT time for Dailydeal product
414         var _second = 1000; 404         var _second = 1000;
415         var _minute = _second * 60; 405         var _minute = _second * 60;
416         var _hour = _minute * 60; 406         var _hour = _minute * 60;
417         var _day = _hour * 24; 407         var _day = _hour * 24;
418         var timer; 408         var timer;
419  409 
420         //Set date as magentodatetime 410         //Set date as magentodatetime
421         var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>'); 411         var date = new Date('<?php echo $_dailydealhelper->getcurrentDate() ?>');
422         if (app.isAppleDevice()) { 412         if (app.isAppleDevice()) {
423           var mdate = '<?php echo $_dailydealhelper->getcurrentDate() ?>'; 413           var mdate = '<?php echo $_dailydealhelper->getcurrentDate() ?>';
424           var dateParts = mdate.substring(0,10).split('-'); 414           var dateParts = mdate.substring(0,10).split('-');
425           var timePart = mdate.substr(11); 415           var timePart = mdate.substr(11);
426           date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart; 416           date = dateParts[1] + '/' + dateParts[2] + '/' + dateParts[0] + ' ' + timePart;
427           date = new Date(date); 417           date = new Date(date);
428         } 418         }
429         var l_date = new Date(); 419         var l_date = new Date();
430         var offset_date = l_date - date; 420         var offset_date = l_date - date;
431  421 
432         function showRemaining() 422         function showRemaining()
433         { 423         {
434             $(".sw-dailydeal-wrapper").each(function(){ 424             $(".sw-dailydeal-wrapper").each(function(){
435                 var unique_id = $(this).attr("data-unique-id"); 425                 var unique_id = $(this).attr("data-unique-id");
436                 // get Value of dailydeal product 426                 // get Value of dailydeal product
437                 var cid='countdown_'+unique_id; 427                 var cid='countdown_'+unique_id;
438                 var daysid='countdown_days_'+unique_id; 428                 var daysid='countdown_days_'+unique_id;
439                 var hoursid='countdown_hours_'+unique_id; 429                 var hoursid='countdown_hours_'+unique_id;
440                 var minutesid='countdown_minutes_'+unique_id; 430                 var minutesid='countdown_minutes_'+unique_id;
441                 var secondsid='countdown_seconds_'+unique_id; 431                 var secondsid='countdown_seconds_'+unique_id;
442  432 
443                 var startdateid='fromdate_'+unique_id; 433                 var startdateid='fromdate_'+unique_id;
444                 var id='todate_'+unique_id; 434                 var id='todate_'+unique_id;
445  435 
446                 var enddate = new Date($('#'+id).val()); 436                 var enddate = new Date($('#'+id).val());
447                 var dealstartdate=new Date($('#'+startdateid).val()); 437                 var dealstartdate=new Date($('#'+startdateid).val());
448                 if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) { 438                 if (app.isAppleDevice() && $('#'+id).val() && $('#'+startdateid).val()) {
449                   var ledate = $('#'+id).val(); 439                   var ledate = $('#'+id).val();
450                   var ledateParts = ledate.substring(0,10).split('-'); 440                   var ledateParts = ledate.substring(0,10).split('-');
451                   var letimePart = ledate.substr(11); 441                   var letimePart = ledate.substr(11);
452                   enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart; 442                   enddate = ledateParts[1] + '/' + ledateParts[2] + '/' + ledateParts[0] + ' ' + letimePart;
453                   enddate = new Date(enddate).getTime(); 443                   enddate = new Date(enddate).getTime();
454  444 
455                   var lsdate = $('#'+startdateid).val(); 445                   var lsdate = $('#'+startdateid).val();
456                   var lsdateParts = lsdate.substring(0,10).split('-'); 446                   var lsdateParts = lsdate.substring(0,10).split('-');
457                   var lstimePart = lsdate.substr(11); 447                   var lstimePart = lsdate.substr(11);
458                   dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart; 448                   dealstartdate = lsdateParts[1] + '/' + lsdateParts[2] + '/' + lsdateParts[0] + ' ' + lstimePart;
459                   dealstartdate = new Date(dealstartdate).getTime(); 449                   dealstartdate = new Date(dealstartdate).getTime();
460                 } 450                 }
461                 var currentdate=new Date(); 451                 var currentdate=new Date();
462  452 
463                 //Get Difference between Two dates 453                 //Get Difference between Two dates
464                 var distance = enddate - (currentdate - offset_date); 454                 var distance = enddate - (currentdate - offset_date);
465  455 
466                 $('.sw-dailydeal-wrapper').show(); 456                 $('.sw-dailydeal-wrapper').show();
467  457 
468                 if (distance < 0) { 458                 if (distance < 0) {
469                    // clearInterval(timer); 459                    // clearInterval(timer);
470                     $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>"); 460                     $('#expired_'+unique_id).html("<span style='font-size:25px; color:#000;'>EXPIRED!<span>");
471  461 
472                 } else if(dealstartdate > currentdate) { 462                 } else if(dealstartdate > currentdate) {
473                    $('.countdowncontainer_'+unique_id).hide(); 463                    $('.countdowncontainer_'+unique_id).hide();
474                    var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>"; 464                    var msg="<span style='font-size:15px; color:#000;'> Coming Soon..<br>Deal Start at:<br>"+$('#'+startdateid).val()+"<span>";
475                    $('#expired_'+unique_id).html(msg); 465                    $('#expired_'+unique_id).html(msg);
476                 } else { 466                 } else {
477                     var days = Math.floor(distance / _day); 467                     var days = Math.floor(distance / _day);
478                     var hours = Math.floor((distance % _day) / _hour); 468                     var hours = Math.floor((distance % _day) / _hour);
479                     var minutes = Math.floor((distance % _hour) / _minute); 469                     var minutes = Math.floor((distance % _hour) / _minute);
480                     var seconds = Math.floor((distance % _minute) / _second); 470                     var seconds = Math.floor((distance % _minute) / _second);
481  471 
482                     if(hours < 10) 472                     if(hours < 10)
483                         hours = "0" + hours; 473                         hours = "0" + hours;
484                     if(minutes < 10) 474                     if(minutes < 10)
485                         minutes = "0" + minutes; 475                         minutes = "0" + minutes;
486                     if(seconds < 10) 476                     if(seconds < 10)
487                         seconds = "0" + seconds; 477                         seconds = "0" + seconds;
488                     $('.countdowncontainer_'+unique_id).show(); 478                     $('.countdowncontainer_'+unique_id).show();
489                     $('#'+daysid).html(days); 479                     $('#'+daysid).html(days);
490                     $('#'+hoursid).html(hours); 480                     $('#'+hoursid).html(hours);
491                     $('#'+minutesid).html(minutes); 481                     $('#'+minutesid).html(minutes);
492                     $('#'+secondsid).html(seconds); 482                     $('#'+secondsid).html(seconds);
493                 } 483                 }
494             }); 484             });
495         } 485         }
496  486 
497         // Set Interval 487         // Set Interval
498         timer = setInterval(function() 488         timer = setInterval(function()
499         { 489         {
500             showRemaining(); 490             showRemaining();
501         }, 1000); 491         }, 1000);
502     }); 492     });
503     </script> 493     </script>
504 <?php 494 <?php
505     echo $block->getChildHtml('filter_toggle'); 495     echo $block->getChildHtml('filter_toggle');
506 ?> 496 ?>